package com.demdevdudes.disch.gamestates;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;
import com.badlogic.gdx.math.Vector3;

public class StateIntro extends AbstractGameState {

	private float x = 0;
	private float y = 0;
	
	public StateIntro(OrthographicCamera camera) {
		super(camera);
	}

	@Override
	public void onTap(float x, float y, int count, int button) {
		// TODO Auto-generated method stub
		Gdx.app.debug("StateIntro", "Tap: " + "X=" + x + " Y=" + y + "count="
				+ count + "button=" + button);
		
		Vector3 vector = translateCoordinates(x, y);
		this.x = vector.x;
		this.y = vector.y;
	}

	@Override
	public void render(float delta) {

		Gdx.gl.glClearColor(0, 0, 0, 1);
		Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
		shapeRenderer.begin(ShapeType.Filled);
		
		shapeRenderer.setColor(Color.GRAY);
		shapeRenderer.circle(this.x, this.y, 20);
		
		shapeRenderer.end();

	}

}
